// 物流请请求
import request,{Method} from '@/libs/api.js'

// 获取商家物流公司列表，如果已选择则checked有值
export function getChecked(storeId){
    return request({
        url : `/store/logistics/getChecked/${storeId}`,
        method: Method.GET,
    })
}

// 获取商家物流公司列表，如果已选择则checked有值
export function getLogistics(storeId){
    return request({
        url : `/store/logistics/getLogistics/${storeId}`,
        method: Method.GET,
    })
}

// 获取所有的物流公司
export function getAllLogistics(){
    return request({
        url : `/store/logistics/getAllLogistics`,
        method: Method.GET,
    })
}

// 添加 店铺-物流公司 关联
export function addStoreLogistics (params) {
    return request({
      url: '/store/storelogistics/addStoreLogistics',
      method: Method.POST,
      data: params
    });
}

// 删除满减活动
export function cancelStoreLogistics(id,storeId){
    return request({
        url : `/store/storelogistics/cancelStoreLogistics/${id}/${storeId}`,
        method: Method.DELETE,
    })
}